﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using JM.JCY.Common;
using NCS.IConnect.PolicyInjection.CallHandlers;
using JM.JCY.BusinessComponent;
using JM.JCY.BusinessEntity;
using JM.JCY.DataAccess;
using JM.JCY.BusinessEntity.DTOs.Notification;

namespace JM.JCY.BusinessFacade
{
    public class NotificationBF: JCYBusinessFacadeBase<NotificationBC>,INotification
    {
        public NotificationBF()
            : base(new NotificationBC())
        {
        }

        public int InsertNotification(SingleNotification NotificationObj)
        {
            return this.BusinessComponent.InsertNotification(NotificationObj);
        }

        public int InsertNotifications(MultipleNotifications NotificationObj)
        {
            return this.BusinessComponent.InsertNotifications(NotificationObj);
        }

        public NotificationDataSet.NotificationTableDataTable GetTopXNotifications(int staffId)
        {
            return this.BusinessComponent.GetTopXNotifications(staffId);
        }

        public NotificationDataSet.NotificationTableDataTable GetLastThirtyDaysNotifications(int staffId)
        {
            return this.BusinessComponent.GetLastThirtyDaysNotifications(staffId);
        }

        public void MarkAsRead(int[] NotificationIds)
        {
            this.BusinessComponent.MarkAsRead(NotificationIds);
        }

        public void MarkAllAsRead(string RecipientId)
        {
            this.BusinessComponent.MarkAllAsRead(RecipientId);
        }

        public int GetUnreadCount(int recipientId)
        {
            return this.BusinessComponent.GetUnreadCount(recipientId);
        }
    }
}
